home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / • Obsolete⁄Unsupported / ScriptX / Code Samples / autofind / source / notes.sx < prev    next >
Encoding:
Text File  |  1996-05-21  |  543 b   |  34 lines  |  [TEXT/ttxt]

  1. in module Autofinder
  2.  
  3. class NotesEdit (TextEdit)
  4. instance variables
  5.     hasFocus
  6. end
  7.  
  8. method init self {class NotesEdit} #rest args ->
  9. (
  10.     apply nextMethod self args
  11.     self.hasFocus := undefined
  12. )
  13.  
  14. method processFocus self {class NotesEdit} int ev ->
  15. (
  16.     nextMethod self int ev
  17.  
  18.     if ev.focusType = @loseFocus then
  19.         self.hasFocus := undefined
  20.     else
  21.         self.hasFocus := true
  22.         
  23. )
  24.  
  25. method processMouseDown self {class NotesEdit} int ev ->
  26. (
  27. print "Mouse Down!"
  28.     nextMethod self int ev
  29. print self.hasfocus
  30.     if self.hasFocus do    false
  31. )
  32.  
  33. "Compiled Notes"
  34.